feat(ui): surface anchor errors as unavailable rows (#474 B041)#600
Conversation
|
Someone is attempting to deploy a commit to the ezedikeevan's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@spiffamani Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
determined-001
left a comment
There was a problem hiding this comment.
The check (node 20) and check (node 22) CI jobs are failing. Please run npm run lint and npm run test locally, fix any errors, and push so CI goes green before this can merge.
ezedike-evan
left a comment
There was a problem hiding this comment.
The check (node 20) and check (node 22) CI jobs are failing. Please run npm run lint && npm run test locally, fix any errors, and push so checks go green before this can merge.
ezedike-evan
left a comment
There was a problem hiding this comment.
Everything here is in good shape and correctly closes #474 — logic, types, and tests all line up.
One blocker: check (node 20/22) is failing on format:check (Prettier) for the 3 files this PR touches: app/offramp/page.tsx, components/offramp/RateTable.tsx, tests/components/RateTable.test.tsx. Please run npx prettier --write on those three files, commit, and push — once that's green this is ready to merge.
What
Closes #474 B041
Failed anchors returned in
errors[]byfetchCorridorRatesweresilently dropped — the UI only rendered
rates[]. This PR surfacesthem as greyed-out "Unavailable" rows so users know an anchor failed
and why.
Changes
types/index.ts— addAnchorRateErrorinterface anderrors?field toRateComparisonhooks/useAnchorRates.ts— exposeanchorErrors: AnchorRateError[]onUseAnchorRatesResultcomponents/offramp/RateTable.tsx— render failed anchors as unavailable rows withtitletooltip showing the reason; disabled Execute buttonapp/offramp/page.tsx— destructureanchorErrorsand pass to<RateTable>tests/components/RateTable.test.tsx— 3 new test cases covering unavailable row renderingTesting
tsc --noEmitclean